package com.dldata.devtools30.entity;

import jakarta.persistence.*;

import java.util.Objects;

@Entity
@Table(name = "devt_excel_field")
public class DevtExcelFieldEntity {
    private String id;
    private String name;
    private Integer xh;
    private String excelId;
    private String fieldId;

    @Id
    @Column(name = "id", nullable = false, length = 64)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 256)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "xh", nullable = true)
    public Integer getXh() {
        return xh;
    }

    public void setXh(Integer xh) {
        this.xh = xh;
    }

    @Basic
    @Column(name = "excel_id", nullable = true, length = 64)
    public String getExcelId() {
        return excelId;
    }

    public void setExcelId(String excelId) {
        this.excelId = excelId;
    }

    @Basic
    @Column(name = "field_id", nullable = true, length = 64)
    public String getFieldId() {
        return fieldId;
    }

    public void setFieldId(String fieldId) {
        this.fieldId = fieldId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DevtExcelFieldEntity that = (DevtExcelFieldEntity) o;
        return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(xh, that.xh) && Objects.equals(excelId, that.excelId) && Objects.equals(fieldId, that.fieldId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, xh, excelId, fieldId);
    }
}
